﻿using ConfigCreate.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConfigCreate
{
    /// <summary>
    /// 密码框
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
    public class CreatePasswordBoxAttribute : CreateBaseAttribute
    {
        /// <summary>
        /// 密码框
        /// </summary>
        /// <param name="header_name">大类别名</param>
        /// <param name="group_name">组名</param>
        /// <param name="title">控件标题</param>
        public CreatePasswordBoxAttribute(string header_name, string group_name, string title) : base(header_name, group_name, title)
        { }

        /// <summary>
        /// 占位符
        /// </summary>
        public string? Placeholder { get; set; }
        /// <summary>
        /// 密码长度
        /// </summary>
        public int? PasswordLength { get; set; }
        /// <summary>
        /// 是否显示可查找明码密码按钮
        /// </summary>
        public bool ShowEyeButton { get; set; } = true;
        /// <summary>
        /// 是否显示清空按钮
        /// </summary>
        public bool ShowClearButton { get; set; } = true;
        /// <summary>
        /// 设置密码代替字符
        /// </summary>
        public char? PasswordChar { get; set; }
    }
}
